import request from '../utils/request.js';

// 获取 留言的内容
export const postLeaveContent = () => {
  return request({
    method: 'post',
    url: '/AboutMessage/findMessage',
  });
};

//  获取所有的 留言评论
export const postLeaveCom = () => {
  return request({
    method: 'post',
    url: '/message/findAllMessage',
  });
};

// 评论 留言
export const postAddLeaveCom = (token, content, parentId, toUserId) => {
  return request({
    method: 'post',
    url: '/message/newMessage',
    headers: { Authorization: token },
    data: { content: content, parentId: parentId, toUserId: toUserId },
  });
};
